package com.core.Comprimento;

import com.core.enumerators.ComprimentoType;

public class ComprimentoFactory {
	
	public static ComprimentoBase Create(ComprimentoType comprimentoType, double valueTobeconverted ){
		 switch (comprimentoType)
         {
             case Quilometro:
                 return new Quilometro(valueTobeconverted);
             case Metro:
                 return new Metro(valueTobeconverted);
             case Centimetro:
                 return new Centimetro(valueTobeconverted);
             case Milimetro:
                 return new Milimetro(valueTobeconverted);
             case Jarda:
                 return new Jarda(valueTobeconverted);
             case Polegada:
                 return new Polegada(valueTobeconverted);
             case Pe:
                 return new Pe(valueTobeconverted);
             default:
                 return null;
         }
	}
}